package gui.custom;

import java.awt.Color;
import java.awt.Cursor;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Insets;
import java.awt.RenderingHints;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import javax.swing.Icon;
import javax.swing.JButton;

import foxtrot.Worker;

public class AAButton extends JButton
{
	public static final Font FONT = new Font("Verdana", Font.ITALIC, 10);	
	public AAButton(String text)
	{
		super(text);
		init();
	}
	
	public AAButton(Icon icon)
	{
		super(icon);
		init();
	}
		
	private void init()
	{
		setFont(FONT);
		setForeground(Color.GRAY);
		setContentAreaFilled(false);
		setMargin(new Insets(1, 1, 1, 1));
		setBorderPainted(false);
		setFocusPainted(false);		
		
		setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
	}
	
	public void paint(Graphics g)
	{
		Graphics2D g2 = (Graphics2D) g;
		g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
		g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT);

		super.paint(g);
	}
}
